Remove gtk_widget_intersect
authorTimm Bäder <mail@baedert.org>
Thu, 29 Nov 2018 10:14:26 +0000 (11:14 +0100)
committerTimm Bäder <mail@baedert.org>
Thu, 29 Nov 2018 10:14:26 +0000 (11:14 +0100)
It's been broken for quite a while now and doesn't make sense anymore
these days.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkwidget.c
gtk/gtkwidget.h

index a8a26eb926e73c16572fb881ca5d95c159924c6c..2e24ff6f3d9e34e7e044c952de410ade453e8f81 100644 (file)
@@ -4421,7 +4421,6 @@ gtk_widget_list_accel_closures
 gtk_widget_can_activate_accel
 gtk_widget_event
 gtk_widget_activate
-gtk_widget_intersect
 gtk_widget_is_focus
 gtk_widget_grab_focus
 gtk_widget_grab_default
index da34d57020d0738d20383ae1edc146bbe936a861..4fadd96534491748fc0f137c656c49b41051263d 100644 (file)
@@ -5253,49 +5253,6 @@ gtk_widget_activate (GtkWidget *widget)
     return FALSE;
 }
 
-/**
- * gtk_widget_intersect:
- * @widget: a #GtkWidget
- * @area: a rectangle
- * @intersection: (out caller-allocates) (optional): rectangle to store
- *   intersection of @widget and @area
- *
- * Computes the intersection of a @widget’s area and @area, storing
- * the intersection in @intersection, and returns %TRUE if there was
- * an intersection.  @intersection may be %NULL if you’re only
- * interested in whether there was an intersection.
- *
- * Returns: %TRUE if there was an intersection
- **/
-gboolean
-gtk_widget_intersect (GtkWidget                 *widget,
-                     const GdkRectangle *area,
-                     GdkRectangle       *intersection)
-{
-  GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-  GdkRectangle *dest;
-  GdkRectangle tmp;
-  gint return_val;
-
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
-  g_return_val_if_fail (area != NULL, FALSE);
-
-  if (intersection)
-    dest = intersection;
-  else
-    dest = &tmp;
-
-  return_val = gdk_rectangle_intersect (&priv->allocation, area, dest);
-
-  if (return_val && intersection && _gtk_widget_get_has_surface (widget))
-    {
-      intersection->x -= priv->allocation.x;
-      intersection->y -= priv->allocation.y;
-    }
-
-  return return_val;
-}
-
 /**
  * _gtk_widget_grab_notify:
  * @widget: a #GtkWidget
index 44e779c71a564f734be1356cfa729980014c1827..5d6236ea8a51d24ef99f5a693abc8da6700c461c 100644 (file)
@@ -458,11 +458,6 @@ gboolean   gtk_widget_send_focus_change   (GtkWidget           *widget,
 GDK_AVAILABLE_IN_ALL
 gboolean   gtk_widget_activate               (GtkWidget        *widget);
 
-GDK_AVAILABLE_IN_ALL
-gboolean   gtk_widget_intersect           (GtkWidget           *widget,
-                                           const GdkRectangle  *area,
-                                           GdkRectangle        *intersection);
-
 GDK_AVAILABLE_IN_ALL
 void    gtk_widget_freeze_child_notify    (GtkWidget           *widget);
 GDK_AVAILABLE_IN_ALL